﻿using MovingChameLibrary.PersonalDataManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MovingChame.WindowsStoreApp.StorageManager
{
    public static class StorageManager
    {
        public static void SavePersonalData(SavedPersonalData personalData)
        {
            StorageHelper<SavedPersonalData> storageHelper = new StorageHelper<SavedPersonalData>(StorageType.Local);
            storageHelper.SaveASync(personalData, StorageConstants.StoredFileName);
        }

        public async static Task<SavedPersonalData> RetrievePersonalData()
        {
            StorageHelper<SavedPersonalData> storageHelper = new StorageHelper<SavedPersonalData>(StorageType.Local);
            return await storageHelper.LoadASync(StorageConstants.StoredFileName);
        }
    }
}